package com.ordos.recruit.module.file.service;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ordos.recruit.module.file.entity.TbFileInfo;
import com.ordos.recruit.module.file.mapper.FileMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class FileService {
    private final FileMapper fileMapper;

    public void updateFile(String fileCode,String userId) {
        UpdateWrapper<TbFileInfo> wrapper = Wrappers.update();
        wrapper.eq("FILE_CODE", fileCode);
        TbFileInfo tlieInfo = TbFileInfo.builder().createUser(userId).build();
        fileMapper.update(tlieInfo,wrapper);
    }
}
